package it.com;

import java.util.Random;
import java.util.Scanner;

public class TernaryOperation {
    public static void main(String[] args) {
        //三元运算符
        int a = 100;
        String string = a > 120 ? "优秀" : "不优秀";
        System.out.println("string = " + string);

        //键盘录入
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个数");
        int i1 = scanner.nextInt();
        System.out.println("请输入第二个数");
        int i2 = scanner.nextInt();
        System.out.println(i1 + i2);


        //随机数random
        Random random = new Random();
        int i = random.nextInt();
        System.out.println("i = " + i);


    }
}
